<?php
	include_once "dataservice.php";
	
	class phantrang_db
	{
		public function CapNhat($Limit, $SoTrangHienThi)
		{
			$sql = "UPDATE 	`tbl_phantrang` 
					SET 	`Limit`          = '$Limit',
							`SoTrangHienThi` = '$SoTrangHienThi' 
					WHERE 	1";
			
			$service = new dataservice();
			return $service->ExecuteNonQuery($sql);
		}
		
		public function LayDanhSach()
		{
			$sql = "SELECT * FROM `tbl_phantrang` WHERE 1";
			
			$service = new dataservice();
			return $service->ExecuteQuery($sql);
		}
	}
?>